<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function fn(shijian){
            if(shijian<=0){
                alert('请输入大于0秒数')
                return
            }
            let h =parseInt(shijian/60/60%24)
            let m =parseInt(shijian/60%60)
            let s =parseInt(shijian%60)
            h = h<10?'0'+h:h
            m = m<10?'0'+m:m
            s = s<10?'0'+s:s
            return '时间是'+h+'小时'+m+'分钟'+s+'秒'
        }
        document.write(fn(+prompt()))
    </script>
</body>
</html>